<template>
  <div>Home</div>
  <span>展示count ： {{ $store.state.count }}</span>
  <br />
  <span>展示name ： {{ $store.state.info.name }}</span>
  <br />
  <button @click="increment()">点击</button>
  <!-- 会自动传参 -->
  <button @click="increment(10)">点击10</button>
  <button @click="changeName({ name: 'dd' })">changeName</button>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  methods: {
    ...mapMutations(['increment', 'changeName']),
  },
}
</script>

<style lang="scss" scoped></style>
